﻿using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace MT.Common.QueueTask
{
    public class BackManagerService : BackgroundService
    {
        /// <inheritdoc />
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            while (!stoppingToken.IsCancellationRequested)
            {
                Foo();
                await Task.Delay(TimeSpan.FromSeconds(1), stoppingToken);
            }
        }

        private void Foo()
        {
        }
    }
}